home *** CD-ROM | disk | FTP | other *** search
- Path: academy.bastad.se!news
- From: sten@academy.bastad.se (Sten Jansson)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: detachable program
- Date: 13 Mar 1996 17:20:18 GMT
- Organization: Connection Bastad
- Message-ID: <773.6646T648T1645@academy.bastad.se>
- References: <Pine.BSD.3.91.960310002355.23759B-100000@ugly.cute.fi>
- NNTP-Posting-Host: academy.bastad.se
- Mime-Version: 1.0
- Content-Type: text/plain; charset=iso-8859-1
- Content-Transfer-Encoding: 8bit
- X-Newsreader: THOR 2.22 (Amiga;TCP/IP) *UNREGISTERED*
-
-
- >Help me!
- >I want to know how to make a program that detaches itself from CLI
-
- I have given it a thought too. I think you should use LoadSeg() and
- CreateProc(). I made a little test program in C:
- --
- #include <exec/types.h>
- #include <dos/dos.h>
- #include <proto/exec.h>
- #include <proto/dos.h>
-
- void main()
- {
- BPTR SEGMENT;
- UBYTE *NAME="c:requestfile",*NAME_PROC="my_proc";
- struct MsgPort *PROCESS;
- SEGMENT=LoadSeg(NAME);
- if(!SEGMENT)
- {
- printf("%d\n",IoErr());
- exit(0);
- }
- PROCESS=CreateProc(NAME_PROC,40,SEGMENT,10000);
- if(!PROCESS)
- printf("%d\n",IoErr());
- exit(0);
-
- }
- --
- However I only managed to run a few program e.g. requestfile.
- Please tell me if You manage to make it work properly! Write me a Email
- then , 'cos I don't get all the letters in news.
-
- Sten
-
-